package cn.com.ldns.opentetris.shape;

import javax.microedition.khronos.opengles.GL10;

public class Point extends BaseShape {
	private static float vertices[] = {
			0.0f,0.0f,0.0f
	};

	private static short indices[] = {0};
	
	public Point() {
		super(vertices, indices);
	}
	
	public Point(float[] vertex) {
		super(vertex, null, null);
	}
	
	public Point(float[] vertex, short[] index) {
		super(vertex, index, null);
	}
	
	public Point(float[] vertex, float[] color) {
		super(vertex, null, color);
	}
	
	@Override
	public void draw(GL10 gl) {
		super.draw(gl);
		gl.glPointSize(10f);
		gl.glEnableClientState(GL10.GL_VERTEX_ARRAY);
		gl.glVertexPointer(3, GL10.GL_FLOAT, 0,vertexBuff);
		gl.glDrawArrays(GL10.GL_POINTS, 0, vertex.length / 3);
		gl.glDisableClientState(GL10.GL_VERTEX_ARRAY);
	}
}
